package com.bwie.controller;

import com.bwie.pojo.Logs;
import com.bwie.utils.R;
import lombok.extern.slf4j.Slf4j;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Date;

/**
 * @Author: liuzhuan
 * @Date: 2025/7/28 08:57
 * @Description: ToDo
 **/
@RestController
@RequestMapping("/user/index")
@Slf4j
public class LogsController {
    @PostMapping("/LogList")
    @Transactional(rollbackFor = Exception.class)
    public R Loglist(@RequestBody @Validated Logs logs){
        log.info("name"+logs.getLogName());
        log.info("time"+new Date());
        return R.OK();
    }
}
